PulseCanvas / app · pulsecanvas.ai / Sources / PulseCanvas / Resources / ProjectM / Presets / Hypnotic / Polar Warp / flexi - grind my glitch up [032].milk
| 1 | MILKDROP_PRESET_VERSION=201 |
| 2 | PSVERSION=3 |
| 3 | PSVERSION_WARP=3 |
| 4 | PSVERSION_COMP=3 |
| 5 | [preset00] |
| 6 | fRating=5.000000 |
| 7 | fGammaAdj=1.000 |
| 8 | fDecay=1.000 |
| 9 | fVideoEchoZoom=2.000 |
| 10 | fVideoEchoAlpha=0.000 |
| 11 | nVideoEchoOrientation=1 |
| 12 | nWaveMode=0 |
| 13 | bAdditiveWaves=1 |
| 14 | bWaveDots=0 |
| 15 | bWaveThick=0 |
| 16 | bModWaveAlphaByVolume=1 |
| 17 | bMaximizeWaveColor=1 |
| 18 | bTexWrap=1 |
| 19 | bDarkenCenter=0 |
| 20 | bRedBlueStereo=0 |
| 21 | bBrighten=0 |
| 22 | bDarken=0 |
| 23 | bSolarize=0 |
| 24 | bInvert=0 |
| 25 | fWaveAlpha=0.009 |
| 26 | fWaveScale=2.713 |
| 27 | fWaveSmoothing=0.000 |
| 28 | fWaveParam=0.000 |
| 29 | fModWaveAlphaStart=1.200 |
| 30 | fModWaveAlphaEnd=1.200 |
| 31 | fWarpAnimSpeed=0.204 |
| 32 | fWarpScale=8.471 |
| 33 | fZoomExponent=1.00000 |
| 34 | fShader=0.000 |
| 35 | zoom=0.99951 |
| 36 | rot=0.00000 |
| 37 | cx=0.500 |
| 38 | cy=0.500 |
| 39 | dx=0.00000 |
| 40 | dy=0.00000 |
| 41 | warp=0.15038 |
| 42 | sx=1.00000 |
| 43 | sy=1.00000 |
| 44 | wave_r=0.440 |
| 45 | wave_g=0.400 |
| 46 | wave_b=1.000 |
| 47 | wave_x=0.500 |
| 48 | wave_y=0.500 |
| 49 | ob_size=0.005 |
| 50 | ob_r=0.010 |
| 51 | ob_g=0.000 |
| 52 | ob_b=0.000 |
| 53 | ob_a=1.000 |
| 54 | ib_size=0.260 |
| 55 | ib_r=0.250 |
| 56 | ib_g=0.250 |
| 57 | ib_b=0.250 |
| 58 | ib_a=0.000 |
| 59 | nMotionVectorsX=44.160 |
| 60 | nMotionVectorsY=33.600 |
| 61 | mv_dx=0.000 |
| 62 | mv_dy=0.000 |
| 63 | mv_l=0.500 |
| 64 | mv_r=1.000 |
| 65 | mv_g=0.000 |
| 66 | mv_b=0.000 |
| 67 | mv_a=0.000 |
| 68 | b1n=0.000 |
| 69 | b2n=0.000 |
| 70 | b3n=0.000 |
| 71 | b1x=1.000 |
| 72 | b2x=1.000 |
| 73 | b3x=1.000 |
| 74 | b1ed=0.000 |
| 75 | wavecode_0_enabled=1 |
| 76 | wavecode_0_samples=512 |
| 77 | wavecode_0_sep=4 |
| 78 | wavecode_0_bSpectrum=1 |
| 79 | wavecode_0_bUseDots=0 |
| 80 | wavecode_0_bDrawThick=1 |
| 81 | wavecode_0_bAdditive=1 |
| 82 | wavecode_0_scaling=100.00000 |
| 83 | wavecode_0_smoothing=0.00000 |
| 84 | wavecode_0_r=0.050 |
| 85 | wavecode_0_g=0.150 |
| 86 | wavecode_0_b=1.000 |
| 87 | wavecode_0_a=1.000 |
| 88 | wave_0_init1=t2 = 0; |
| 89 | wave_0_init2=t3 = 0; |
| 90 | wave_0_init3=t4 = 0; |
| 91 | wave_0_init4=ab = 1; |
| 92 | wave_0_per_frame1=// parameters |
| 93 | wave_0_per_frame2=w = time*0.5; // rotation (0..2Pi) |
| 94 | wave_0_per_frame3=t1 = 0.5; // center for rotation (x) |
| 95 | wave_0_per_frame4=t2 = 0.5; // center for rotation (y) |
| 96 | wave_0_per_frame5=t3 = 1; // scale |
| 97 | wave_0_per_frame6=t4 = 0; // translation (x) |
| 98 | wave_0_per_frame7=t5 = 0; // translation (y) |
| 99 | wave_0_per_frame8=t6 = sin(w); |
| 100 | wave_0_per_frame9=t7 = cos(w); |
| 101 | wave_0_per_point1=xx = if(equal(sample,0),q3,xx); |
| 102 | wave_0_per_point2=yy = if(equal(sample,0),q4,yy); |
| 103 | wave_0_per_point3= |
| 104 | wave_0_per_point4= |
| 105 | wave_0_per_point5=dx = xx*(1-xx)-q5*xx*yy/(xx+q6); |
| 106 | wave_0_per_point6=dy = q7*yy*(1-yy/xx); |
| 107 | wave_0_per_point7= |
| 108 | wave_0_per_point8=x1 = xx; |
| 109 | wave_0_per_point9=y1 = yy; |
| 110 | wave_0_per_point10= |
| 111 | wave_0_per_point11=xx = xx+dx*0.2; |
| 112 | wave_0_per_point12=yy = yy+dy*0.2; |
| 113 | wave_0_per_point13= |
| 114 | wave_0_per_point14=x1 = 0.5+(x1-0.5)/q1 + dy*value1*0.01; |
| 115 | wave_0_per_point15=y1 = 0.5+(y1-0.5)/q2 - dx*value1*0.01; |
| 116 | wave_0_per_point16= |
| 117 | wave_0_per_point17= |
| 118 | wave_0_per_point18=// synchronized affine transformation |
| 119 | wave_0_per_point19=x = q26 + ((x1-q26)*q32 + (y1-q27)*q31)*q28 + q29; |
| 120 | wave_0_per_point20=y = q27 + (-(x1-q26)*q31 + (y1-q27)*q32)*q28 + q30; |
| 121 | wavecode_1_enabled=0 |
| 122 | wavecode_1_samples=512 |
| 123 | wavecode_1_sep=0 |
| 124 | wavecode_1_bSpectrum=0 |
| 125 | wavecode_1_bUseDots=0 |
| 126 | wavecode_1_bDrawThick=0 |
| 127 | wavecode_1_bAdditive=0 |
| 128 | wavecode_1_scaling=1.00000 |
| 129 | wavecode_1_smoothing=0.50000 |
| 130 | wavecode_1_r=1.000 |
| 131 | wavecode_1_g=1.000 |
| 132 | wavecode_1_b=1.000 |
| 133 | wavecode_1_a=1.000 |
| 134 | wave_1_per_point1=xx1 = if(equal(sample,0),q11,xx1); |
| 135 | wave_1_per_point2=yy1 = if(equal(sample,0),q12,yy1); |
| 136 | wave_1_per_point3=zz1 = if(equal(sample,0),q13,zz1); |
| 137 | wave_1_per_point4= |
| 138 | wave_1_per_point5=dx1 = q14*(yy1-xx1); |
| 139 | wave_1_per_point6=dy1 = xx1*(q15-zz1)-yy1; |
| 140 | wave_1_per_point7=dz1 = xx1*yy1-q16*zz1; |
| 141 | wave_1_per_point8=xx1 = xx1 + q17*dx1; |
| 142 | wave_1_per_point9=yy1 = yy1 + q17*dy1; |
| 143 | wave_1_per_point10=zz1 = zz1 + q17*dz1; |
| 144 | wave_1_per_point11= |
| 145 | wave_1_per_point12=my_x = xx1*0.02; |
| 146 | wave_1_per_point13=my_y = yy1*0.02; |
| 147 | wave_1_per_point14=my_z = zz1*0.02; |
| 148 | wave_1_per_point15= |
| 149 | wave_1_per_point16=x = 0.5 + my_x; |
| 150 | wave_1_per_point17=y = 0.5 + my_y; |
| 151 | wavecode_2_enabled=0 |
| 152 | wavecode_2_samples=512 |
| 153 | wavecode_2_sep=0 |
| 154 | wavecode_2_bSpectrum=0 |
| 155 | wavecode_2_bUseDots=0 |
| 156 | wavecode_2_bDrawThick=0 |
| 157 | wavecode_2_bAdditive=0 |
| 158 | wavecode_2_scaling=1.00000 |
| 159 | wavecode_2_smoothing=0.50000 |
| 160 | wavecode_2_r=1.000 |
| 161 | wavecode_2_g=1.000 |
| 162 | wavecode_2_b=1.000 |
| 163 | wavecode_2_a=1.000 |
| 164 | wavecode_3_enabled=0 |
| 165 | wavecode_3_samples=512 |
| 166 | wavecode_3_sep=0 |
| 167 | wavecode_3_bSpectrum=0 |
| 168 | wavecode_3_bUseDots=0 |
| 169 | wavecode_3_bDrawThick=0 |
| 170 | wavecode_3_bAdditive=0 |
| 171 | wavecode_3_scaling=1.00000 |
| 172 | wavecode_3_smoothing=0.50000 |
| 173 | wavecode_3_r=1.000 |
| 174 | wavecode_3_g=1.000 |
| 175 | wavecode_3_b=1.000 |
| 176 | wavecode_3_a=1.000 |
| 177 | shapecode_0_enabled=0 |
| 178 | shapecode_0_sides=3 |
| 179 | shapecode_0_additive=1 |
| 180 | shapecode_0_thickOutline=0 |
| 181 | shapecode_0_textured=0 |
| 182 | shapecode_0_num_inst=1 |
| 183 | shapecode_0_x=0.670 |
| 184 | shapecode_0_y=0.530 |
| 185 | shapecode_0_rad=0.17457 |
| 186 | shapecode_0_ang=0.25133 |
| 187 | shapecode_0_tex_ang=3.14159 |
| 188 | shapecode_0_tex_zoom=0.99979 |
| 189 | shapecode_0_r=1.000 |
| 190 | shapecode_0_g=1.000 |
| 191 | shapecode_0_b=1.000 |
| 192 | shapecode_0_a=1.000 |
| 193 | shapecode_0_r2=1.000 |
| 194 | shapecode_0_g2=1.000 |
| 195 | shapecode_0_b2=1.000 |
| 196 | shapecode_0_a2=1.000 |
| 197 | shapecode_0_border_r=1.000 |
| 198 | shapecode_0_border_g=0.500 |
| 199 | shapecode_0_border_b=0.150 |
| 200 | shapecode_0_border_a=0.000 |
| 201 | shapecode_1_enabled=0 |
| 202 | shapecode_1_sides=23 |
| 203 | shapecode_1_additive=1 |
| 204 | shapecode_1_thickOutline=0 |
| 205 | shapecode_1_textured=0 |
| 206 | shapecode_1_num_inst=817 |
| 207 | shapecode_1_x=0.500 |
| 208 | shapecode_1_y=0.500 |
| 209 | shapecode_1_rad=0.02798 |
| 210 | shapecode_1_ang=0.00000 |
| 211 | shapecode_1_tex_ang=3.14159 |
| 212 | shapecode_1_tex_zoom=0.99979 |
| 213 | shapecode_1_r=1.000 |
| 214 | shapecode_1_g=1.000 |
| 215 | shapecode_1_b=1.000 |
| 216 | shapecode_1_a=0.410 |
| 217 | shapecode_1_r2=1.000 |
| 218 | shapecode_1_g2=1.000 |
| 219 | shapecode_1_b2=1.000 |
| 220 | shapecode_1_a2=0.000 |
| 221 | shapecode_1_border_r=1.000 |
| 222 | shapecode_1_border_g=1.000 |
| 223 | shapecode_1_border_b=1.000 |
| 224 | shapecode_1_border_a=0.000 |
| 225 | shapecode_2_enabled=0 |
| 226 | shapecode_2_sides=100 |
| 227 | shapecode_2_additive=0 |
| 228 | shapecode_2_thickOutline=0 |
| 229 | shapecode_2_textured=1 |
| 230 | shapecode_2_num_inst=1 |
| 231 | shapecode_2_x=0.900 |
| 232 | shapecode_2_y=0.500 |
| 233 | shapecode_2_rad=0.10000 |
| 234 | shapecode_2_ang=0.00000 |
| 235 | shapecode_2_tex_ang=0.00000 |
| 236 | shapecode_2_tex_zoom=1.00000 |
| 237 | shapecode_2_r=1.000 |
| 238 | shapecode_2_g=1.000 |
| 239 | shapecode_2_b=1.000 |
| 240 | shapecode_2_a=1.000 |
| 241 | shapecode_2_r2=1.000 |
| 242 | shapecode_2_g2=1.000 |
| 243 | shapecode_2_b2=1.000 |
| 244 | shapecode_2_a2=1.000 |
| 245 | shapecode_2_border_r=1.000 |
| 246 | shapecode_2_border_g=1.000 |
| 247 | shapecode_2_border_b=1.000 |
| 248 | shapecode_2_border_a=0.100 |
| 249 | shape_2_per_frame1=x = sin(time) * .4 + .5; |
| 250 | shape_2_per_frame2= |
| 251 | shape_2_per_frame3= |
| 252 | shape_2_per_frame4=pow( (bass*.15),2); |
| 253 | shapecode_3_enabled=0 |
| 254 | shapecode_3_sides=36 |
| 255 | shapecode_3_additive=1 |
| 256 | shapecode_3_thickOutline=0 |
| 257 | shapecode_3_textured=0 |
| 258 | shapecode_3_num_inst=1 |
| 259 | shapecode_3_x=0.500 |
| 260 | shapecode_3_y=0.500 |
| 261 | shapecode_3_rad=0.81623 |
| 262 | shapecode_3_ang=0.00000 |
| 263 | shapecode_3_tex_ang=0.00000 |
| 264 | shapecode_3_tex_zoom=1.00000 |
| 265 | shapecode_3_r=0.000 |
| 266 | shapecode_3_g=0.040 |
| 267 | shapecode_3_b=0.000 |
| 268 | shapecode_3_a=1.000 |
| 269 | shapecode_3_r2=0.000 |
| 270 | shapecode_3_g2=0.000 |
| 271 | shapecode_3_b2=0.000 |
| 272 | shapecode_3_a2=0.000 |
| 273 | shapecode_3_border_r=1.000 |
| 274 | shapecode_3_border_g=1.000 |
| 275 | shapecode_3_border_b=1.000 |
| 276 | shapecode_3_border_a=0.000 |
| 277 | shape_3_per_frame1=x = 1-q1; |
| 278 | shape_3_per_frame2=y = q2; |
| 279 | shape_3_per_frame3=x = 0.5 + (x - 0.5)*0.25; |
| 280 | shape_3_per_frame4=y = 0.5 + (y - 0.5)*0.25; |
| 281 | per_frame_init_1=x1 = 0; |
| 282 | per_frame_init_2=y1= .001; |
| 283 | per_frame_init_3=z1 = 0; |
| 284 | per_frame_1=zoom = 1; |
| 285 | per_frame_2=warp = 0; |
| 286 | per_frame_3=wave_a = 0; |
| 287 | per_frame_4= |
| 288 | per_frame_5= |
| 289 | per_frame_6=// below parameters belong to an extended "Lotka-Volterra" model (simple predator-prey differential equation system - see wikipedia) |
| 290 | per_frame_7= |
| 291 | per_frame_8=startx = 0.7; // initial predator population (used only for the phase plot) |
| 292 | per_frame_9=starty = 0.7; // initial prey population |
| 293 | per_frame_10= |
| 294 | per_frame_11=a = 1.0; // LV-model parameters - some pairs reach a so-called limit-cycle |
| 295 | per_frame_12=b = 0.14; |
| 296 | per_frame_13=d = 0.2; |
| 297 | per_frame_14= |
| 298 | per_frame_15=q1 = aspectx; |
| 299 | per_frame_16=q2 = aspecty; |
| 300 | per_frame_17= |
| 301 | per_frame_18=q3 = startx; |
| 302 | per_frame_19=q4 = starty; |
| 303 | per_frame_20= |
| 304 | per_frame_21=q5 = a; // the model parameters are synchronized for the phase plot wave and the per-vertex warp |
| 305 | per_frame_22=q6 = b; |
| 306 | per_frame_23=q7 = d; |
| 307 | per_frame_24= |
| 308 | per_frame_25= |
| 309 | per_frame_26=vol = bass*8 + mid*5 + treb*3; |
| 310 | per_frame_27=m = m*0.97 + vol*0.08; |
| 311 | per_frame_28=monitor = vol; |
| 312 | per_frame_29=beat = above(vol,res)*above(vol,m)*above(vol,16); |
| 313 | per_frame_30=diff = (1-beat)*diff + beat*(vol-res); |
| 314 | per_frame_31=res = beat*(vol + m*0.04) + (1-beat)*(res - (0.1+diff*0.02)*60/fps); |
| 315 | per_frame_32=res = max(0,res); |
| 316 | per_frame_33= |
| 317 | per_frame_34=w = if(beat,rand(3.14*2),w); |
| 318 | per_frame_35=x = if(beat,rand(1),x); |
| 319 | per_frame_36=y = if(beat,rand(1),y); |
| 320 | per_frame_37= |
| 321 | per_frame_38=// below parameters belong to a synchronized affine transformation for waves and the per-vertex code (rotate, scale, translate) |
| 322 | per_frame_39= |
| 323 | per_frame_40=q26 = 0.5*x; // center for rotation and scaling (x) |
| 324 | per_frame_41=q27 = 0.5*y; // center for rotation and scaling (y) |
| 325 | per_frame_42=q28 = 1; // scale |
| 326 | per_frame_43=q29 = 0.4; // translate x |
| 327 | per_frame_44=q30 = 0.1; // translate y |
| 328 | per_frame_45=q31 = sin(w); |
| 329 | per_frame_46=q32 = cos(w); |
| 330 | per_frame_47=q25 = w; |
| 331 | per_frame_48=// TODO: compensate parameter changes for an invariant canvas pane via difference quotients ;) |
| 332 | per_frame_49= |
| 333 | per_frame_50=// integration |
| 334 | per_frame_51=bb = bb*0.98 + bass*0.5; |
| 335 | per_frame_52=mm = mm*0.98 + mid*0.5; |
| 336 | per_frame_53=tt = tt*0.98 + treb*0.5; |
| 337 | per_frame_54= |
| 338 | per_frame_55=// normalization |
| 339 | per_frame_56=mx = max(max(bb,mm),tt); |
| 340 | per_frame_57=mn = min(min(bb,mm),tt); |
| 341 | per_frame_58= |
| 342 | per_frame_59=h1 = (bb-mn)/(mx-mn); |
| 343 | per_frame_60=h2 = (mm-mn)/(mx-mn); |
| 344 | per_frame_61=h3 = (tt-mn)/(mx-mn); |
| 345 | per_frame_62= |
| 346 | per_frame_63=// integration again (for constant change in one variable) |
| 347 | per_frame_64=v = 0.1/fps; |
| 348 | per_frame_65=bm = bm + (h1-h2)*v; |
| 349 | per_frame_66=mt = mt + (h2-h3)*v; |
| 350 | per_frame_67=bt = bt + (h1-h3)*v; |
| 351 | per_frame_68= |
| 352 | per_frame_69=// emit |
| 353 | per_frame_70=q10 = bm; |
| 354 | per_frame_71=q11 = mt; |
| 355 | per_frame_72=q12 = bt; |
| 356 | per_frame_73=v = bm; |
| 357 | per_frame_74=q13 = sin(v); |
| 358 | per_frame_75=q14 = cos(v); |
| 359 | per_pixel_1=x = 0.5 + (x-0.5)*q1; |
| 360 | per_pixel_2=y = 0.5 - (y-0.5)*q2; |
| 361 | per_pixel_3= |
| 362 | per_pixel_4=x = q26 + (x-q26)/q28 - q29; |
| 363 | per_pixel_5=y = q27 + (y-q27)/q28 - q30; |
| 364 | per_pixel_6= |
| 365 | per_pixel_7=// have a nice warp effect? - rotate it like a shape! |
| 366 | per_pixel_8= |
| 367 | per_pixel_9= angle = -q25; |
| 368 | per_pixel_10= |
| 369 | per_pixel_11=///////////////////////////////////////////////////////// |
| 370 | per_pixel_12=X1 = x - q26; |
| 371 | per_pixel_13=Y1 = y - q27; |
| 372 | per_pixel_14=x = q26 + cos(-angle)*X1 -sin(-angle)*Y1; // rotate the x/y pane |
| 373 | per_pixel_15=y = q27 + sin(-angle)*X1 +cos(-angle)*Y1; |
| 374 | per_pixel_16=///////////////////////////////////////////////////////// |
| 375 | per_pixel_17= |
| 376 | per_pixel_18= |
| 377 | per_pixel_19=dx = x*(1-x)-q5*x*y/(x+q6); |
| 378 | per_pixel_20=dy = -q7*y*(1-y/x); |
| 379 | per_pixel_21= |
| 380 | per_pixel_22=dx = -0.01*dx/q1; |
| 381 | per_pixel_23=dy = -0.01*dy/q2; |
| 382 | per_pixel_24= |
| 383 | per_pixel_25= |
| 384 | per_pixel_26=//dx = 0; |
| 385 | per_pixel_27=//dy = 0; |
| 386 | per_pixel_28= |
| 387 | per_pixel_29=///////////////////////////////////////////////////////// |
| 388 | per_pixel_30=dx1 = cos(angle)*dx - sin(angle)*dy; // and finally the dx/dy pane is rotated to match the x/y pane |
| 389 | per_pixel_31=dy1 = sin(angle)*dx + cos(angle)*dy; |
| 390 | per_pixel_32=dx = dx1*aspectx; |
| 391 | per_pixel_33=dy = dy1*aspecty; |
| 392 | per_pixel_34=///////////////////////////////////////////////////////// |
| 393 | warp_1=`shader_body |
| 394 | warp_2=`{ |
| 395 | warp_3=`//uv = uv_orig; |
| 396 | warp_4=`ret.z = GetPixel(uv).z*0.5; |
| 397 | warp_5=` |
| 398 | warp_6=` float pixelDistance = 4; |
| 399 | warp_7=` float motionStrength = 4; |
| 400 | warp_8=` |
| 401 | warp_9=` float diffusionFactor = 1; |
| 402 | warp_10=` float decay = -0.014; |
| 403 | warp_11=` |
| 404 | warp_12=` float2 uv_y = lerp(uv_orig,uv,0); |
| 405 | warp_13=` float2 dither_uv = uv_orig*texsize.xy*texsize_noise_lq.zw*diffusionFactor; |
| 406 | warp_14=` |
| 407 | warp_15=` float2 d = texsize.zw*pixelDistance; |
| 408 | warp_16=` float1 dx = ( 2*GetBlur1(uv_y + float2(1,0)*d) - 2*GetBlur1(uv_y-float2(1,0)*d) ).y*0.5; |
| 409 | warp_17=` float1 dy = ( 2*GetBlur1(uv_y + float2(0,1)*d) - 2*GetBlur1(uv_y-float2(0,1)*d) ).y*0.5; |
| 410 | warp_18=` |
| 411 | warp_19=` float2 my_uv = uv_y + float2(dx,dy)*texsize.zw*motionStrength; |
| 412 | warp_20=` |
| 413 | warp_21=` ret.y = tex2D( sampler_fw_main, saturate(my_uv)).y; |
| 414 | warp_22=` |
| 415 | warp_23=` ret.y += (ret - GetBlur1(uv_y)).y*0.025 + decay; |
| 416 | warp_24=` |
| 417 | warp_25=` |
| 418 | warp_26=` ret.y += (tex2D(sampler_noise_lq, dither_uv).y-0.5)*0.02; |
| 419 | warp_27=` |
| 420 | warp_28=` dx = ( 2*GetBlur1(uv_y + float2(1,0)*d) - 2*GetBlur1(uv_y-float2(1,0)*d) ).x*0.5; |
| 421 | warp_29=` dy = ( 2*GetBlur1(uv_y + float2(0,1)*d) - 2*GetBlur1(uv_y-float2(0,1)*d) ).x*0.5; |
| 422 | warp_30=` |
| 423 | warp_31=` my_uv = uv - float2(dx,dy)*texsize.zw*motionStrength; |
| 424 | warp_32=` |
| 425 | warp_33=`ret.x = GetPixel(my_uv).x - ret.y*0.01 + 0.004; |
| 426 | warp_34=`ret.x += (tex2D(sampler_noise_lq, dither_uv).x-0.5)*0.01 + ret.z*0.14; |
| 427 | warp_35=`} |
| 428 | comp_1=`float2 complex_div(float2 numerator, float2 denominator){ |
| 429 | comp_2=` return float2( numerator.x*denominator.x + numerator.y*denominator.y, |
| 430 | comp_3=` numerator.y*denominator.x - numerator.x*denominator.y)/ |
| 431 | comp_4=` (denominator.x*denominator.x + denominator.y*denominator.y); |
| 432 | comp_5=`} |
| 433 | comp_6=` |
| 434 | comp_7=`float2 uv_polar(float2 domain, float2 center){ |
| 435 | comp_8=` float2 c = domain - center; |
| 436 | comp_9=` float rad_hq = length(c); |
| 437 | comp_10=` float ang_hq = atan2(c.x,c.y); |
| 438 | comp_11=` return float2(ang_hq*M_INV_PI_2, rad_hq); |
| 439 | comp_12=`} |
| 440 | comp_13=` |
| 441 | comp_14=`float2 uv_polar_logarithmic(float2 domain, float2 center, int fins, float log_factor, float2 coord){ |
| 442 | comp_15=` float2 polar = uv_polar(domain, center); |
| 443 | comp_16=` return float2(polar.x*fins+coord.x, log_factor*log(polar.y) + coord.y); |
| 444 | comp_17=`} |
| 445 | comp_18=` |
| 446 | comp_19=`float2 uv_moebius_transformation(float2 domain, float2 zeroPoint, float2 infinityPoint,float zoom){ |
| 447 | comp_20=` return complex_div((domain - zeroPoint)*zoom, domain - infinityPoint)+0.5; |
| 448 | comp_21=`} |
| 449 | comp_22=` |
| 450 | comp_23=`float2 uv_bipolar(float2 domain, float2 northPole, float2 southPole, int fins, float log_factor, float2 coord){ |
| 451 | comp_24=` float2 help_uv = uv_moebius_transformation(domain, northPole, southPole, 1); |
| 452 | comp_25=` return uv_polar_logarithmic(help_uv,0.5,fins,log_factor,coord); |
| 453 | comp_26=`} |
| 454 | comp_27=` |
| 455 | comp_28=` |
| 456 | comp_29=`float2 uv_rotate( float2 domain, float2 center, float sinw, float cosw, float scale){ |
| 457 | comp_30=` float2 uv_r = (domain-center); |
| 458 | comp_31=` return center + float2( cosw*uv_r.x - sinw*uv_r.y, sinw*uv_r.x + cosw*uv_r.y)*scale; |
| 459 | comp_32=`} |
| 460 | comp_33=` |
| 461 | comp_34=` |
| 462 | comp_35=`shader_body |
| 463 | comp_36=`{ |
| 464 | comp_37=` |
| 465 | comp_38=`// bipolar |
| 466 | comp_39=`uv = 0.5 + (uv-0.5)*1.5; |
| 467 | comp_40=`float2 rotate_uv = 0.5+uv_rotate(0 + (uv-0.5)*aspect.xy, 0, q13, q14, 2); |
| 468 | comp_41=`float2 bipolar_uv = uv_bipolar(rotate_uv,float2(0,0.5),float2(1,0.5), 2, 0.35, float2(q11,q12)); |
| 469 | comp_42=`float2 mirror_uv = 0.5 + (0.5 - abs( frac( bipolar_uv * 0.5 ) * 2.0 - 1.0 )); |
| 470 | comp_43=` |
| 471 | comp_44=`uv = mirror_uv; |
| 472 | comp_45=`uv = 0.5 + (uv-0.5)*1.5; |
| 473 | comp_46=`rotate_uv = 0.5+uv_rotate(0 + (uv-0.5), 0, q13, q14, 2); |
| 474 | comp_47=`bipolar_uv = uv_bipolar(rotate_uv,float2(0,0.5),float2(1,0.5), 2, 0.35, float2(q11,q12)); |
| 475 | comp_48=`mirror_uv = 0.5 + (0.5 - abs( frac( bipolar_uv * 0.5 ) * 2.0 - 1.0 )); |
| 476 | comp_49=` |
| 477 | comp_50=`uv = mirror_uv; |
| 478 | comp_51=` |
| 479 | comp_52=` float2 d = texsize.zw*4; |
| 480 | comp_53=` float3 dx = ( 2*GetBlur1(uv+float2(1,0)*d)-2*GetBlur1(uv-float2(1,0)*d) )*0.5; |
| 481 | comp_54=` float3 dy = ( 2*GetBlur1(uv+float2(0,1)*d)-2*GetBlur1(uv-float2(0,1)*d) )*0.5; |
| 482 | comp_55=` float2 uv_y = uv+float2(dx.y,dy.y)*0.5; |
| 483 | comp_56=` |
| 484 | comp_57=`ret = GetPixel(uv+float2(dx.y,dy.y)*0.03).y; |
| 485 | comp_58=`ret = lerp(float3(1,0.6,0),float3(0.,-0.5,0),(1-ret.y)*1-1 + length(0-uv_y)); |
| 486 | comp_59=` |
| 487 | comp_60=`//ret = GetPixel(uv); |
| 488 | comp_61=`} |
| 489 | comp_62=` |